<?php
    define('IN_PHPBB', true);
    
    
    $phpbb_root_path = '../../.././';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);
    

    

    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup('viewtopic');
    
    
    //affichage des liens

$ban_ban = "SELECT * FROM dmi_banniere_banniere ORDER BY date DESC, cat DESC";

if(!$requete = mysql_query($ban_ban))

{

	dmi_error("index.php","Impossible d'afficher les bannieres : ".mysql_error(),$bann_bann);

	$links_tab = array(


			"BANN_IMAGE" 	=> "Erreur SQL",
			
			"BANN_LEGENDE"		=> "Erreur",
			
			"BANN_THUMB"	=> "Erreur",

			"BANN_ALT"		=> "Erreur",

			"BANN_RESUME"		=> "Suite &agrave; une erreur technique nous ne pouvons pas vous proposer sur cette page

			les bannieres. L'&eacute;quipe technique a &eacute;t&eacute; inform&eacute;e.<br> 

			Veuillez nous excuser pour la g&ecirc;ne occasionn&eacute;.",

			"BANN_CAT"	=> "",
      
      "BANN_AUTEUR"	=> "Staff Technique de DMI",

);
}
else

{

	while($ban_ban = mysql_fetch_assoc($requete))

	{

		$template->assign_block_vars('bann',array(

			"BANN_IMAGE" 	=> $ban_ban['banniere'],

			"BANN_LEGENDE"		=> $ban_ban['legende'],

			"BANN_THUMB"	=> $ban_ban['thumb'],

			"BANN_ALT"		=> $ban_ban['date'],

			"BANN_RESUME"		=> $ban_ban['resume'],

			"BANN_CAT"	=> $ban_ban['cat'],
			
			"BANN_BACKCOLOR" => $ban_ban['back_color'],

		));

	}

}	
    
     

    page_header('Les banni&egrave;res de DMI');
    
    $template->assign_vars(array(
        'S_COMMUN'                    => true, 
    ));

    $template->set_filenames(array(
    'body' => './dmi/communs/dmi_banners.html',
    ));



    make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
    page_footer();
    ?>